const Mock = require('mockjs')
const Random = Mock.Random


const processForensicsData = function () {
  let newList = []
  for (let i = 0; i < 100; i++) {
    let newObject = {
      key: i + '',
      user: Random.first(),
      pid: Random.string('number', 1, 2),
      cpu: '0.0',
      mem: '0.0',
      vsz: '0',
      rss: '0',
      tty: '?',
      stat: 'I<',
      start_time: Random.datetime(),
      command: '[rcu_gp]',
      insertion_time: Random.datetime(),
      forensices_user: Random.first(),
      certificate_number: Random.integer(0, 100),
      on_chain_hash: Random.string('number', 32, 32),
    }
    newList.push(newObject)
  }
  return newList
}
Mock.mock('http://localhost:8081/mock/processforensicsdata', processForensicsData)